package com.jinzhi.jzweb.domain.enumConstants;

public enum IntentionEnum {
    INTENTION("0","常务副理事单位"),INTENTION1("1","副理事单位"),INTENTION2("2","常务理事单位")
    ,INTENTION3("3","理事单位");

    IntentionEnum(String code, String descp){
        this.code = code;
        this.descp = descp;
    }

    private final String code;
    private final String descp;

    public String getCode() {
        return code;
    }

    public String getDescp() {
        return descp;
    }


    public static String getDescpByCode(String code){
        for (IntentionEnum value: IntentionEnum.values()) {
            if(value.getCode().equals(code)){
                return value.getDescp();
            }
        }
        return null;
    }

    public static IntentionEnum getEnumByCode(String code){
        for (IntentionEnum value: IntentionEnum.values()) {
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
